import Vue from 'vue'
import Vuex from 'vuex'
import order from './order/order.js'
Vue.use(Vuex)


const store = new Vuex.Store({
    state: {
		browseTime:0,
		city:"深圳",
		provinceData:[],
		cityData:[],
		areaData:[],
		isRecharge:{//判断充值页面状态
			isMoney:0
		},
		order_address:""
		
	},
    mutations: {
		//计算浏览商品时间
		BROWSE_ADD(state){
			state.browseTime++
		},
		fnRecharge(state,isMoney){//判断充值页面状态
		state.isRecharge.isMoney=isMoney	
		},
		fnAddress(state,data){
			state.order_address=data
			console.log(state.order_address)
		}
	},
    actions: {
		browse_add({commit}){
			commit('BROWSE_ADD')
		}
	},
	getters:{
		
	},
	modules:{
		order
	}
})

export default store